package com.huike.clues.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author EthanRuins
 * @date 2023/7/13
 * @apiNote
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ImportDataVO {
    private Integer successNum;
    private Integer failureNum;

    public static ImportDataVO success() {
        return new ImportDataVO(1, 0);
    }

    public static ImportDataVO error() {
        return new ImportDataVO(0, 1);
    }

    public ImportDataVO addAll(ImportDataVO data) {
        this.failureNum += data.getFailureNum();
        this.successNum += data.getSuccessNum();
        return this;
    }
}
